package common.utils;


import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

/**
 * Created by yinzhiqun on 2016/1/13.
 *
 */
public class ThreadTransformer<T> implements Observable.Transformer<T,T>  {

    @Override
    public Observable<T> call(Observable<T> observable) {

        return observable.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());
    }
}
